package com.googlecode.horncomb.bean.filter;

import java.util.HashMap;
import java.util.Map;

public class SimpleMapConditionSet implements ConditionSet {
	protected Map<String, Object> conditionMap = new HashMap<String, Object>();

	public SimpleMapConditionSet() {
		super();
	}

	public SimpleMapConditionSet(Map<String, Object> map) {
		super();
		this.conditionMap = map;
	}

	public SimpleMapConditionSet addConstraint(String key, Object value) {
		this.conditionMap.put(key, value);
		return this;
	}

	public Map<String, Object> getConstraintsMap() {
		return conditionMap;
	}

	/**
	 * {@inheritDoc}
	 */
	public boolean isEmpty() {
		return this.conditionMap.isEmpty();
	}
}
